home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_shs_ambinterior.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  114 lines

  1. # Jones 3D Cog Script
  2. #
  3. # shs_AmbInterior.cog
  4. #
  5. # Plays a random sound at random intervals with random volume and panning
  6. #
  7. #
  8. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  9. # ========================================================================================
  10.  
  11. symbols
  12.  
  13.     message        startup
  14.        message        entered
  15.     message     pulse
  16.  
  17.     # Entry Tower
  18.     
  19.     sector      start_ETladder      linkID=1
  20.     sector      stop_ETladder       linkID=0
  21.     
  22.     # Clock Tower
  23.     
  24.         # By the ladder
  25.     sector      start_CTladder      linkID=1
  26.     sector      stop_CTladder       linkID=0
  27.         # By the gate
  28.     sector      start_CTgate          linkID=1
  29.     sector      stop_CTgate           linkID=0
  30.         # By the door
  31.     sector      start_CTdoor          linkID=1
  32.     sector      stop_CTdoor           linkID=0
  33.     
  34.     # Bell Tower
  35.          # By the gate
  36.     sector      start_BTgate          linkID=1
  37.     sector      stop_BTgate          linkID=0
  38.         # By the door
  39.     sector      start_BTdoor          linkID=1
  40.     sector      stop_BTdoor           linkID=0
  41.         
  42.         # By the window
  43.     sector      start_BTwin          linkID=1
  44.     sector      stop_BTwin           linkID=0
  45.     
  46.     # Big Nave
  47.         # By the big door
  48.     sector      start_BNdoor          linkID=1
  49.     sector      stop_BNdoor           linkID=0
  50.     
  51.     # Upper Nave
  52.         # By the windows
  53.     sector      start_UNwin1          linkID=1
  54.     sector      stop_UNwin1           linkID=0
  55.     sector      start_UNwin2          linkID=1
  56.     sector      stop_UNwin2           linkID=0
  57.      
  58.     sound        ambient0=shw_amb1.wav   local
  59.     sound        ambient1=shw_amb2.wav   local
  60.     sound        ambient2=shw_amb3.wav   local
  61.     sound        ambient3=shw_amb4.wav   local
  62.     sound        ambient4=shw_amb5.wav   local
  63.     sound        ambient5=shw_amb6.wav   local
  64.     sound        ambient6=shw_amb7.wav   local
  65.     
  66.     thing        player                    local
  67.  
  68. end
  69.  
  70. # ========================================================================================
  71.  
  72.  
  73. code
  74.  
  75. # ........................................................................................
  76.  
  77. startup:
  78.     
  79.     player = GetLocalPlayerThing();
  80.     Sleep(25); #until opening scene is over
  81.     SetPulse(3.0);
  82. return;
  83.  
  84. # ........................................................................................
  85.  
  86.     entered:
  87.     
  88.         if(GetSenderID() == 1)
  89.         {
  90.             SetPulse(3.0);
  91.             
  92.         }
  93.         
  94.         if(GetSenderID() == 0)
  95.         {
  96.             SetPulse(0.0);
  97.         }
  98.         
  99.         return;
  100.     
  101.     # ========================================================================================
  102.     
  103.     pulse:
  104.         
  105.         #Play a random sound, random volume, random pan
  106.         PlaySoundLocal(ambient0[RandBetween(0, 6)], ((RandBetween(1, 3)*.1)), ((rand()*2)-1.0), 0x0, 0);
  107.         return;
  108.     
  109.     # ========================================================================================
  110.     
  111.     end
  112.     
  113.  
  114.